<template>
  <div class="app-container" />
</template>

<script>
import { getQualityDetail } from '@/api/knowledge/quality'
import waves from '@/directive/waves' // waves directive
import { } from '@/utils'

export default {
  name: 'ComplexTable',
  components: { },
  directives: { waves },
  filters: {
  },
  data() {
    return {
      tableKey: 0,
      qualityForm: {
        code: '',
        title: '',
        remark: '',
        status: {
          label: '',
          value: 1
        }
      },
      qualityFormRules: []
    }
  },
  created() {
    let qualityID = this.$route.query && this.$route.query.qualityID
    if (qualityID !== undefined) {
      qualityID = parseInt(qualityID)
      if (!isNaN(qualityID)) {
        this.listLoading = true
        const formData = {
          'qualityID': qualityID
        }
        getQualityDetail(formData).then(response => {
          if (response.status === 200) {
            this.qualityForm = response.data
          } else {
            this.$message({
              message: response.msg,
              type: 'error'
            })
          }
        })
      }
    }
    console.log(qualityID)
  },
  methods: {
    handleCannel() {
      this.$router.push({ path: 'quality' })
    }
  }
}
</script>
